package com.langfeiyes.pattern.template.demo2;

import java.util.TimerTask;

public class App {

    //要统计耗时的代码
    public static void doLoop(){
        for (int i = 0; i < 10; i++) {
            System.out.println("hello world....");
            try {
                Thread.sleep(10000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
        }
    }

    public static void main(String[] args) {
       new SimpleLogicStatisTime().excute(App::doLoop);
       System.out.println("-------------------");
       new PrettyLogicStatisTime().excute(App::doLoop);
    }
}
